package com.wing.sell.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.sell.model.entity.SelReturnGoodsRecords;
import com.wing.sell.model.request.SelGoodsLogisticsDetailAddForm;
import com.wing.sell.model.request.SelReturnGoodRecordsUpdateForm;
import com.wing.sell.model.response.SelReturnGoodRecordsSearchVo;

import java.util.Map;

/**
 * 销售退货-service
 */
public interface SelReturnGoodsRecordsService extends IService<SelReturnGoodsRecords> {

    Page<SelReturnGoodRecordsSearchVo> pageList4app(Page<SelReturnGoodRecordsSearchVo> pg, Map<String, Object> params);

    /**
     * 添加退货记录
     * @param selReturnGoodRecordsUpdateForm
     * @return
     */
    int addReturnRecordsGoods(SelReturnGoodRecordsUpdateForm selReturnGoodRecordsUpdateForm);

    /**
     * 修改退货记录
     * @param form
     * @return
     */
    int updateReturnRecordsGoods(SelReturnGoodRecordsUpdateForm form);

    /**
     * 查询销售退货详情
     * @param recordId
     * @return
     */
    SelReturnGoodRecordsUpdateForm getByDetailId(String recordId);

    /**
     * 删除记录
     * @param recordId
     * @return
     */
    boolean deleteBy(String recordId);

    /**
     * 退货收货
     * @param selBarterGoodRecordsUpdateForm
     * @return
     */
    int addLogisticsInfo(SelGoodsLogisticsDetailAddForm selBarterGoodRecordsUpdateForm);
}
